#ifndef SELF_DEFINE_FUNCTIONS_H_INCLUDED
#define SELF_DEFINE_FUNCTIONS_H_INCLUDED


#include "./CEC2013/Header.h"
#include <math.h>
#include <boost/random.hpp>
#include <boost/random/uniform_int.hpp>
#include <boost/random/cauchy_distribution.hpp>
#include <boost/random/normal_distribution.hpp>
#include <boost/random/uniform_real.hpp>




const int Population_size = 400;

const int MAX_FV= 5000000;
const int dim = 1000;
const int record_FV_set[] = { 500000,1000000,1500000,2000000,2500000,3000000,3500000,4000000,4500000,5000000}; // record results when the number of fitness evaluations is greater than the elements in the set
const int record_set_size = 10;



struct NewType
{
    double data;
    int id;
};




Benchmarks* generateFuncObj(int funcID);

bool Compare_NewType( NewType data1, NewType data2 );

void Fitness( double &results, double *particle,  int &FV, Benchmarks* fp );

void Fitness_Computation( double *results, double **population, int &gbest, int num, int dim, int &FV, Benchmarks* fp );

void Update_Particle( double *particle, double *speed, double *exemplar1, double *exemplar2, double *lb, double *ub, int dim, double phi, double sign );

void Rank( int *ranking, double *population_results, NewType *temp, int population_size );

void Sort_Population( int *sorted_index, double *population_results, NewType *temp, int population_size );




#endif // SELF_DEFINE_FUNCTIONS_H_INCLUDED
